package cn.seaboot.admin.logger.bean;

import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.Size;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * POJO
 * 登录日志 [t_sys_log_login]
 *
 * @author Mr.css on 2018-6-20
 */
@Schema(description = "登录日志 [t_sys_log_login] 实体类")
public class LoginLog implements Serializable {

    private static final long serialVersionUID = 6079918833553818627L;
    /**
     * ID
     */
    @NotNull
    @Size( max = 32)
    @Schema(description = "ID")
    private String id;
    /**
     * 登录接口
     */
    @Size( max = 8)
    @Schema(description = "登录接口")
    private String channel;
    /**
     * 操作IP地址
     */
    @Size( max = 128)
    @Schema(description = "操作IP地址")
    private String remote;
    /**
     * 用户代理
     */
    @Size( max = 255)
    @Schema(description = "用户代理")
    private String userAgent;
    /**
     * 创建者
     */
    @Size( max = 32)
    @Schema(description = "创建者")
    private String userId;
    /**
     * 创建者
     */
    @Size( max = 32)
    @Schema(description = "创建者")
    private String userName;
    /**
     * 创建者
     */
    @Size( max = 255)
    @Schema(description = "令牌")
    private String token;
    /**
     * 创建者
     */
    @Schema(description = "登录状态")
    private Integer status;
    /**
     *
     */
    @Schema(description = "创建日期")
    private LocalDateTime gmtCreate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getRemote() {
        return remote;
    }

    public void setRemote(String remote) {
        this.remote = remote;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "LoginLog{" +
                "id='" + id + '\'' +
                ", channel='" + channel + '\'' +
                ", remote='" + remote + '\'' +
                ", userAgent='" + userAgent + '\'' +
                ", userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", token='" + token + '\'' +
                ", status=" + status +
                ", gmtCreate=" + gmtCreate +
                '}';
    }
}
